<template>
	<view class="content">
		<!-- 头部 -->
		<view class="header paddinglr">
			<!-- 用户信息 -->
			<view class="flexbetween" @click="tologin">
				<view class="flex">
					<view class="avtarBox margin_right2">
						<image src="/static/goods.png" mode=""></image>
					</view>
					<view>
						<view class="color_ling text_weight">一满眶暮色</view>
						<view class="color_six text_f margin_top2">13756878923</view>
					</view>
				</view>
				<!-- <view class="right_icon"></view> -->
				<view class="flexleft">
					<view class="leftselect" :class="isWork==0?'select':'noSelect'" @click="isWork=0">接單</view>
					<view class="rightselect" :class="isWork==1?'select':'noSelect'" @click="isWork=1">休息</view>
				</view>
				<!-- 禁止接單 -->
				<!-- <view class="flexleft prohibitBox" @click="show=true">
					<view class="margin_right1">禁止接單</view>
					<image class="prohibitImg" src="/static/images/mine/prohibit.png" mode=""></image>
				</view> -->
			</view>
			<!-- 今日訂單、账户余额 -->
			<view class="margin_top5 flexbetween">
				<view class="mainpadding ffffff positionr tabBox">
					<view class="text">今日訂單</view>
					<view class="num margin_top2">455</view>
					<view class="imgBox">
						<image src="/static/images/mine/orderImg.png" mode=""></image>
					</view>
				</view>
				<view class="mainpadding ffffff positionr tabBox">
					<view class="text">账户余额</view>
					<view class="num margin_top2">$45556</view>
					<view class="imgBox">
						<image src="/static/images/mine/balanceImg.png" mode=""></image>
					</view>
				</view>
			</view>
		</view>
		<!-- 列表 -->
		<view class="actionBox paddinglr">
			<view class="paddinglr ffffff border1">
				<view class="actionItem flexbetween line_b" @click="jumpurl('/pages_mine/zichangl')">
					<view class="flexleft">
						<image class="listImg" src="/static/images/mine/listImg1.png" mode=""></image>
						<view class="color_three text_f">我的錢包</view>
					</view>
					<view class="right_icon"></view>
				</view>
				<view class="actionItem flexbetween line_b" @click="jumpurl('/pages_mine/myQuest')">
					<view class="flexleft">
						<image class="listImg" src="/static/images/mine/listImg2.png" mode=""></image>
						<view class="color_three text_f">我的任務</view>
					</view>
					<view class="right_icon"></view>
				</view>
				<view class="actionItem flexbetween line_b" @click="jumpurl('/pages_mine/myEvaluate')">
					<view class="flexleft">
						<image class="listImg" src="/static/images/mine/listImg3.png" mode=""></image>
						<view class="color_three text_f">我的評價</view>
					</view>
					<view class="right_icon"></view>
				</view>
				<view class="actionItem flexbetween line_b" @click="jumpurl('/pages_mine/distributionStatistics')">
					<view class="flexleft">
						<image class="listImg" src="/static/images/mine/listImg4.png" mode=""></image>
						<view class="color_three text_f">配送統計</view>
					</view>
					<view class="right_icon"></view>
				</view>
				<view class="actionItem flexbetween line_b" @click="jumpurl('/pages_mine/feedback')">
					<view class="flexleft">
						<image class="listImg" src="/static/images/mine/listImg5.png" mode=""></image>
						<view class="color_three text_f">意見反饋</view>
					</view>
					<view class="right_icon"></view>
				</view>
				<view class="actionItem flexbetween line_b" @click="jumpurl('/pages_mine/setUp')">
					<view class="flexleft">
						<image class="listImg" src="/static/images/mine/listImg6.png" mode=""></image>
						<view class="color_three text_f">設置</view>
					</view>
					<view class="right_icon"></view>
				</view>
			</view>
		</view>
		<!-- 禁止接單弹窗 -->
		<u-popup :show="show" mode="center" round="20" closeOnClickOverlay @close="show=false">
			<view class="popupBox">
				<view class="textcenter text_h color_zero">禁止接單</view>
				<view class="paddinglr margin_top5">
					<view class="text_e color_three textcenter">
						<view>由於您違反平臺規定，現對你處以停單</view>
						<view class="margin_top1">
							<text class="color_red">60小時</text>
							<text>處罰！</text>
						</view>
					</view>
					<view class="margin_top flexcenter">
						<view class="text_d color_red">處罰倒計時：</view>
						<view class="flexleft">
							<view class="timeBox text_d color_fff">40</view>
							<view class="text_d color_red margin_left1 margin_right1">:</view>
							<view class="timeBox text_d color_fff">40</view>
							<view class="text_d color_red margin_left1 margin_right1">:</view>
							<view class="timeBox text_d color_fff">40</view>
						</view>
					</view>
					<view class="margin_top5 numBox textcenter">
						<view class="text_e color_zero">
							<text>纍計</text>
							<text class="color_red">10次</text>
							<text>將會被永久停權，已纍計</text>
							<text class="color_red">1</text>
							<text>次</text>
						</view>
					</view>
				</view>
				<view class="copy" @click="confirm">確認</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isWork:0,//0接單 1休息
				show:false
			}
		},
		methods: {
			goPersonInformation() { //个人信息
				uni.navigateTo({
					url: "/pages_mine/personInformation"
				})
			},
			goMineCollect() { //我的收藏
				uni.navigateTo({
					url: "/pages_mine/mineCollect"
				})
			},
			goTickets() { //我的票券
				uni.reLaunch({
					url: "/pages/order/order?headerTabActive=4&tabActive=1"
				})
			},
			tologin(){
				uni.navigateTo({
					url: "/pages/login/login"
				})
			},
			jumpurl(url) {
				uni.navigateTo({
					url
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	// 头部
	.header {
		height: 357rpx;
		background-image: url("/static/images/mine/header.png");
		background-size: 100% 100%;
		padding-top: 130rpx;

		// 用户信息
		.avtarBox {
			width: 110rpx;
			height: 110rpx;
			border-radius: 50%;
			overflow: hidden;

			image {
				width: 100%;
				height: 100%;
			}
		}
		.leftselect{
			width: 103rpx;
			height: 62rpx;
			line-height: 62rpx;
			text-align: center;
			border-radius: 8rpx 0rpx 0rpx 8rpx;
			font-size: 26rpx;
			font-family: Inter-Regular, Inter;
			font-weight: 400;
		}
		.rightselect{
			width: 103rpx;
			height: 62rpx;
			line-height: 62rpx;
			text-align: center;
			border-radius: 0rpx 8rpx 8rpx 0rpx;
			font-size: 26rpx;
			font-family: Inter-Regular, Inter;
			font-weight: 400;
		}
		.select {
			background: #FFD047;
			border: 1rpx solid #FFD047;
			color: #000000;
		}
		.noSelect {
			background: #FFFFFF;
			border: 1rpx solid #FFB800;
			color: #FFB800;
		}
		// 禁止接單
		.prohibitBox{
			// width: 171rpx;
			// height: 62rpx;
			padding: 15rpx;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			border: 1rpx solid #FF0000;
			font-size: 26rpx;
			font-family: Inter-Regular, Inter;
			font-weight: 400;
			color: #FF0000;
			
			.prohibitImg{
				width: 31rpx;
				height: 31rpx;
			}
		}
		// 今日訂單、账户余额
		.tabBox {
			width: 328rpx;
			height: 154rpx;
			border-radius: 15rpx 15rpx 15rpx 15rpx;
			box-sizing: border-box;

			.text {
				font-size: 26rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #828B96;
			}

			.num {
				font-size: 40rpx;
				font-family: DIN Next LT Pro-Medium, DIN Next LT Pro;
				font-weight: 500;
				color: #171B2B;
			}

			.imgBox {
				width: 111rpx;
				height: 69rpx;
				position: absolute;
				right: 0;
				bottom: 0;

				image {
					width: 100%;
					height: 100%;
				}
			}
		}
	}

	// 列表
	.actionBox {
		// margin-top: -150rpx;

		.actionItem {
			padding: 40rpx 0;
		}

		.listImg {
			width: 38rpx;
			height: 38rpx;
			margin-right: 20rpx;
		}
	}
	
	.popupBox {
		width: 625rpx;
		padding-top: 50rpx;
		.timeBox{
			padding: 8rpx 5rpx;
			background: #FF0000;
			border-radius: 3rpx 3rpx 3rpx 3rpx;
		}
		.numBox{
			padding: 20rpx;
			background: #F2F2F2;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
		}
		.copy {
			width: 100%;
			text-align: center;
			padding: 30rpx 0;
			background-color: rgba(255, 184, 0, 1);
			margin-top: 30rpx;
			border-radius: 0 0 20rpx 20rpx;
			font-size: 30rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #000000;
		}
	}
</style>